#include <stdio.h>
#define MAXLINE 1024
main()
{
   char           line[MAXLINE];
   int            i = 0;
   FILE*          s;

   putw(0, stdout);
   while (fgets(line, MAXLINE, stdin)) {
      i += strlen(line);
      putw(i, stdout);
   }
   return (0);
}
